package com.easy.common.util;

import java.io.BufferedWriter;
import java.io.File;
import java.io.FileOutputStream;
import java.io.OutputStreamWriter;

public class FileUtils {
	
	public static BufferedWriter createBufferedWriter(File file) {
		OutputStreamWriter write = null;
		BufferedWriter writer = null;
		try {
			write = new OutputStreamWriter(new FileOutputStream(file), "UTF-8");
			writer = new BufferedWriter(write);
		} catch (Exception e) {
			e.printStackTrace();
		}
		return writer;
	}
	
	public static void writeLine(BufferedWriter bw, String str) {
		try {
			bw.write(str);
			bw.newLine();
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
}
